Math.Min(L, R)
.Min() method returns the lesser of the two values passed into it. The Functions and Operators equivalent is MIN(eExpression1, eExpression2 (, eExpression3 ...)).
Applies To
Properties and Methods
None
Available
The .Min(L, R) method is available in:
- 15.03.016
- All newer builds
Type
Int32
Syntax
Math.Min(L, R);
Parameters
|
Parameter |
Required |
Description |
|---|---|---|
|
L |
Yes |
A number. Non-numeric values will result in a scripting error message. |
|
R |
Yes |
A number. Non-numeric values will result in a scripting error message. |
Example
Event.Form.MessageBox('Math.Min(1, 2): ' + Math.Min(1, 2) +
'\nMath.Min(-1, -2): ' + Math.Min(-1, -2));
/* Expected Prompt Result:
Math.Min(1, 2): 1
Math.Min(-1, -2): -2
*/